#include "Planeta/planets.h"
#include "Ticket/ticket.h"

int main()
{
    PlanetSystem solarSystem;

    // Считываем планеты из файла "planets.txt" (если файл существует)
    solarSystem.readPlanetsFromFile("Planeta/planets.txt");

    std::cout << "==== Solar System Planets ====" << std::endl;

    solarSystem.printPlanets();

    std::cout << "==== Planets Sorted by Mass ====" << std::endl;
    solarSystem.sortPlanetsByMass();
    solarSystem.printPlanets();

    std::cout << "==== Planets Sorted by Radius ====" << std::endl;
    solarSystem.sortPlanetsByRadius();
    solarSystem.printPlanets();

    solarSystem.writePlanetsToFile("Planeta/planets.txt");

    Ticket ticket;

    std::cout << "==== Ticket Demo ====" << std::endl;

    Ticket::readTicketFromFile(ticket);
    Ticket::printTicket(ticket);

    Ticket::editTicket(ticket);
    Ticket::writeTicketToFile(ticket);
    Ticket::printTicket(ticket);

    return 0;
}